package com.example.bean;


import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class Lifecycle {

    private String content;

    public void setContent(String content){
        this.content = content;
    }

    @PostConstruct
    public void init(){
        System.out.println("init~");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("destroy~");
    }
}
